Skip to content

Conversation

uuf6429
Copy link
Contributor

@uuf6429 uuf6429 commented Oct 17, 2025

  • Renamed ReflectionData.json to ReflectionData.dat since it does not contain valid json (I picked 'dat' since there isn't a well-defined format for PHP and 'dat' is generic enough).
  • .gitignore'd (and removed) .idea/ since I couldn't see how this is helping anyone (and in fact made it worse by committing files by mistake)
  • Fixed permissions of a few files (0755 to 0644) - done "for free" by git when removing .idey.
  • Updated README.md to mention runTests.sh + a slight formatting improvement
  • Slightly improved runTests.sh readability by adding a few blank lines
  • Made runTests.sh support running against arbitrary PHP versions passed as parameters (instead of all versions)
    • Maybe it might make sense to use that script in the github workflow too? It would decrease repetitive code and ensure that the script is working.
  • Fixed tiny typo and removed unused env var from github workflow to avoid confusion

Relates to https://youtrack.jetbrains.com/issue/WI-82914/PHPStorm-stubs-project-state

PHP_VERSION: ${{matrix.php}}

- name: Composer Install
run: docker compose -f docker-compose.yml run -e PHP_VERSION=${{matrix.php}} test_runner composer install --no-progress
Copy link
Contributor Author

@uuf6429 uuf6429 Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The php version variable isn't relevant at this point - we're never installing composer packages for old php versions.


- name: Build Docker Container
run: docker compose -f docker-compose.yml build >/dev/null
run: docker compose -f docker-compose.yml build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why we would want to hide the build output - this could be very useful to debug build failures.

uses: actions/checkout@v4

- name: Build Docker Container
run: docker compose -f docker-compose.yml build test_runner
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prebuilds the docker image, to avoid polluting the "composer install" step.

Side note: we could also move a couple of (build) steps to an earlier job that uploads the built image as an artifact and which both of the current jobs could depend on. But that's a story for another PR. :)

#RUN echo "xdebug.output_dir=/opt/project/xdebug_snapshots" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
#RUN echo "xdebug.log=/opt/project/phpstorm-stubs/xdebug_logs/xdebug.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

RUN git config --global --add safe.directory /opt/project/phpstorm-stubs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves the annoying git warning about the directory being untrusted or suspicious.

@uuf6429
Copy link
Contributor Author

uuf6429 commented Oct 18, 2025

Despite the many improvements, I still can't get the test results from the GH workflow (even from this PR) to much the local ones. None of the test suite tests count seems to match and worse still, I get a lot of errors and failures.

Really wondering how's the situation with other contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant